'use strict';

module.exports = function (grunt) {
    grunt.initConfig({
        stripDebug: {

            dist: {
                files: grunt.file.expandMapping(['dist/**/*.js'], 'dist/', {
                    flatten: true,
                    rename: function (destBase, destPath) {
                        return destBase + destPath;
                    }
                })
            }

        },
        compress: {
            main: {
                options: {
                    mode: 'gzip'
                },
                files: grunt.file.expandMapping(['dist/**/*.js'], 'dist/', {
                    flatten: true,
                    rename: function (destBase, destPath) {
                        return destBase + destPath + '.gz';
                    }
                })

            }
        }
    });
    grunt.loadNpmTasks("grunt-strip-debug");
    grunt.loadNpmTasks('grunt-contrib-compress');
    grunt.registerTask('clean', ['stripDebug', 'compress']);
};

